package pers.cnzdy.ipcserver;

import android.os.Parcel;
import android.os.Parcelable;

public class Quiz implements Parcelable {

    private String statement;

    public Quiz(String statement) {
        this.statement = statement;
    }

    protected Quiz(Parcel in) {
        statement = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(statement);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Quiz> CREATOR = new Creator<Quiz>() {
        @Override
        public Quiz createFromParcel(Parcel in) {
            return new Quiz(in);
        }

        @Override
        public Quiz[] newArray(int size) {
            return new Quiz[size];
        }
    };

    public String getStatement() {
        return statement;
    }

    public void setStatement(String statement) {
        this.statement = statement;
    }

    @Override
    public String toString() {
        return "Quiz statement：" + statement;
    }

    public void readFromParcel(Parcel dest) {
        statement = dest.readString();
    }

}